﻿{extend name="public:base" /}

{block name="css"}
<link href="/static/laydate/theme/default/laydate.css">
<link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css"/>
<link rel="stylesheet" type="text/css" href="__ADMIN__/css/style.css">
{/block}
{block name="content"}

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-content">
                    <form method="post">
                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">名称</label>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control" name="name" placeholder="请输入名称" value="{$info.name}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">价格</label>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control" name="price" placeholder="请输入价格" value="{$info.price}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row layui-form">
                                <label class="col-sm-1 col-form-label">服务</label>
                                <div class="col-sm-3">
                                    <select name="service_id">
                                        <option value="0">请选择</option>
                                        {volist name="service_list" id="vo"}
                                        <option value="{$vo.id}" {$info.service_id == $vo.id ? 'selected' : ''}>{$vo.name}</option>
                                        {/volist}
                                    </select>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">生效时间段</label>
                                <div class="col-sm-3">
                                    <input placeholder="请选择开始时间" name="time" value="{$info.time}" type="text" class="form-control form-control-lg time" readonly="">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row layui-form">
                                <label class="col-lg-1 col-form-label">状态</label>
                                <div class="col-lg-3">
                                    <input type="radio" name="status" value="1" title="启用" {$info.status != 2 ? 'checked' : ''}>
                                    <input type="radio" name="status" value="2" title="禁用" {$info.status == 2 ? 'checked' : ''}>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <input type="hidden" name="id" value="{:input('id')}">

                        <div class="form-group row">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button type="button" class="btn btn-w-m btn-default back-page">返回</button>
                                <button type="button" class="btn btn-w-m btn-primary ajax-post">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

{/block}

{block name='js'}
<script src="__STATIC__/layui/layui.js"></script>
<script src="/static/laydate/laydate.js"></script>
<script>
    layui.use('laydate', function() {
        var laydate = layui.laydate;

        laydate.render({
            elem: '.time', // 指定元素
            type: 'date', // 日期类型
            range: true // 开启范围选择
        });
    });
</script>
{/block}
